#ifndef MAINWINDOW_H
#define MAINWINDOW_H

// Qt
#include <QMainWindow>
#include <QComboBox>
#include <QLineEdit>

// Pcap
#include "pcapwrapper.h"

// Redes
#include "flowplot.h"
#include "core.h"

// std
#include <cmath>

#define DEFAULT_REFRESH_TIME 250

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

    PcapWrapper pcap;
    Core core;

    FlowPlot * plot_in;
    FlowPlot * plot_out;

    // ToolBar Widgets
    QComboBox * comboBox;
    QLineEdit * lineEdit;


public:
    MainWindow();
    ~MainWindow();

private slots:
    void timerEvent(QTimerEvent *);

    void test();

private:
    Ui::MainWindow *ui;

    void updateStatusBar();

private:
    void centerOnScreen();
    void connectActions();
    void createToolBar();
    void createComboBox();
};

#endif // MAINWINDOW_H
